import request from '@/utils/request'

// 查询证书发放管理列表
export function listCertificateIssue(query) {
  return request({
    url: '/training/certificateIssue/list',
    method: 'get',
    params: query
  })
}

// 查询证书发放管理详细
export function getCertificateIssue(certificateIssueId) {
  return request({
    url: '/training/certificateIssue/' + certificateIssueId,
    method: 'get'
  })
}

// 新增证书发放管理
export function addCertificateIssue(data) {
  return request({
    url: '/training/certificateIssue',
    method: 'post',
    data: data
  })
}

// 修改证书发放管理
export function updateCertificateIssue(data) {
  return request({
    url: '/training/certificateIssue',
    method: 'put',
    data: data
  })
}

// 删除证书发放管理
export function delCertificateIssue(certificateIssueId) {
  return request({
    url: '/training/certificateIssue/' + certificateIssueId,
    method: 'delete'
  })
}

//列表
export function getCertificateIssueList(query) {
  return request({
    url: '/training/certificateIssue/getCertificateIssueList',
    method: 'get',
    params: query
  })
}

//查看电子证书
export function getElectronicInfo(certificateIssueIds) {
  return request({
    url: '/training/certificateIssue/getElectronicInfo/' + certificateIssueIds,
    method: 'get'
  })
}

// 快递发放证书
export function expressPaperCertificate(data) {
  return request({
    url: '/training/certificateIssue/expressPaperCertificate',
    method: 'put',
    data: data
  })
}


// 现场领取证书
export function scenePaperCertificate(certificateIssueIds) {
  return request({
    url: '/training/certificateIssue/scenePaperCertificate/' + certificateIssueIds,
    method: 'put'
  })
}


//生成电子证书
export function generateElectronic(data) {
  return request({
    url: '/training/certificateIssue/generateElectronic',
    method: 'put',
    data: data
  })
}

//撤销电子证书
export function cancelElectronic(data) {
  return request({
    url: '/training/certificateIssue/cancelElectronic',
    method: 'put',
    data: data
  })
}
